// part1:C11:ex11.14.cpp
// read int data from string, store them to vector.
#include <iostream>
#include <map>
#include <utility>
#include <string>
#include <vector>
#include <algorithm>
using namespace std;

void add_family(map<string, vector<pair<string, string>>> & families,
                const string &family) {
  families[family];
}

void add_child(map<string, vector<pair<string, string>>> &families,
               const string &family, const string &child, const string &brithday) {
  families[family].push_back({child, brithday});
}

int main(int argc, char *argv[])
{
  map<string, vector<pair<string, string>>> families;

  add_family(families, "Zhang");
  add_child(families, "Zhang", "qiang", "1970-1-1");
  add_child(families, "Zhang", "xiu", "1980-1-1");
  add_child(families, "Zhang", "mi", "1990-1-1");
  add_family(families, "Wang");

  return 0;
}
